<?php
return[
    //控制器通用配置
    //只有validate这个是 两个都验证、且Common验证通过后验证子类。
    //其他的配置均为子类覆盖common，common覆盖内置默认配置。（action>controller>module）;
    //配置表的action部分小驼峰部分写成小写即可
    'common'=>[
        'method'=> ['GET', 'POST', 'PUT', 'DELETE'],
        'is_cross'=>1, //是否允许跨域
        'is_login'=>['create'=>0,'update'=>0,'read'=>1,'delete'=>0],
        'field'=>[['create_time','update_time','is_delete','is_show','sort'],true]
    ],
    'banner'=>[
        'table'=>'active_banner',

    ],
    'catelist'=>[
        'table'=>'active_cate',
    ],
    'cate'=>[
        'table'=>'active_cate',
        'validate'=>[
            'rule' => [
                'cate_id' => ['require','number'],
            ]
        ]
    ],
    'historyarticle'=>[
        'table'=>'active_article',
        'field'=>[['update_time','is_delete','is_show','sort','content'],true],
        'validate'=>[
            'rule' => [
                'page' => ['require','number'],
                'size' => ['require','number']
            ]
        ]
    ],
    'catearticle'=>[
        'table'=>'active_article',
        'field'=>[['update_time','is_delete','is_show','sort','content'],true],
        'validate'=>[
            'rule' => [
                'cate_id'=>['require','number'],
                'page' => ['require','number'],
                'size' => ['require','number']
            ]
        ]
    ],
    'detailarticle'=>[
        'table'=>'active_article',
        'field'=>[['update_time','is_delete','is_show','sort'],true],
        'validate'=>[
            'rule'=>[
                'art_id'=>['require','number'],
            ]
        ]
    ],
    'applylist'=>[
        'table'=>'active_article',
        'field'=>[['update_time','is_delete','is_show','content','sort'],true],
        'validate'=>[
            'rule' => [
                'page' => ['require','number'],
                'size' => ['require','number']
            ]
        ]
    ]


];